<?php $arr = $this->get("post");?>
<form class="x-form" method="post" onsubmit="return ajax_form(this)" action="<?php _e($this->module)?>/Index/delete">
			<div class="x-list-title">
				<table width="100%" height="100%">
					<tr>
						<td align="left">
							<h2>
								Danh sách công văn đi
							</h2>
						</td>
						<td align="right">	
							<div class="x-list-options">
								<a href="#Diploma/indexs/add" class="x-button">Thêm công văn đi</a>
								<div class="x-options-container">
									<a class="x-button"> Tác vụ khác <span class="x-tri">&#9660;</span></a>
									<div class="x-options">
										<a onclick="module_ajax('<?php _moduleUrl($this);?>/Act/delete','f<?php _e($id);?>',this)" class="x-options-item" >Xóa công văn</a>
										<a href="#Diploma/Index/Add" class="x-options-item x-track">Thêm công văn đến</a>
									</div>
								</div>
							</div>
						</td>
					</tr>
				</table>	
			</div>
		<div class="form-message"></div>
		<table width="100%" cellpadding="5" class="x-list" >
			<tr>
				<th width="25" align="center">TT</th>
				
				<th width="65">
					<?php show_order_link('Loại cv','subtype','#Diploma/Indexs/Index',$vars) ;?>
				</th>
				<th width="140">
					<?php show_order_link('Số hiệu','code','#Diploma/Indexs/Index',$vars) ;?>
				</th>
				<th width="100">
					<?php show_order_link('Ngày gửi','date_send','#Diploma/Indexs/Index',$vars) ;?>
				</th>
				<th width="100">
					<?php show_order_link('Ban hành','date_enactment','#Diploma/Indexs/Index',$vars) ;?>
				</th>
				<th width="140">
					<?php show_order_link('Cơ quan ban hành','ogran_by','#Diploma/Indexs/Index',$vars) ;?>
				</th>
				<th ><?php show_order_link('Trích yếu','abstracts','#Diploma/Indexs/Index',$vars) ;?></th>
				<th  colspan="2">Tác vụ</th>
				
				<th align="center" width="25">
					<div class="x-check-container">
						<div class="x-check">
						<input type="checkbox" class="x-checkbox x-checkall"/>
						</div>
						<div class="x-check-options">
							<a class="x-check-item check-all">Chọn tất cả</a>
							<a class="x-check-item uncheck-all">Bỏ chọn tất cả</a>
						</div>
					</div>
				</th>
			</tr>
			<?php
			if(count($arr)==0){
				_e("<tr><td class='x-page' align='center' colspan='11'>Chưa có công văn nào được tạo </td></tr>");
			}else{
				foreach( $arr as $k=>$a ){?>
				<tr>
					<td align="center"><?php _e($k+1);?></td>
					
					<td  width="90"><a href="#Diploma/Indexs/View?ID=<?php _e($a["ID"]);?>"><?php _e($a['subtype_title']);?><?php if($a['prior']==3){_e("<img src='".baseUrl()."/style/images/hight.gif' />");}?></a></td>
					<td width="100"><a href="#Diploma/Index/view?ID=<?php _e($a["ID"]);?>"><?php _e(short_title(strip_tags($a['code'],''),14));?></a></td>
					<td width="100" align="center"><a href="#Diploma/Indexs/View?ID=<?php _e($a["ID"]);?>"><?php _e(show_date(DATE_FORMAT,$a['date_send']));?></a></td>
					<td width="100" align="center"><a href="#Diploma/Indexs/View?ID=<?php _e($a["ID"]);?>"><?php _e(show_date(DATE_FORMAT,$a['date_enactment']));?></a></td>
					<td width="140"><a href="#"><?php _e(short_title(strip_tags($a['ogran_by'],''),20));?></a></td>
					<td><?php _e(short_title(strip_tags($a['abstracts'],''),40));?></td>
				
					<td align="center" width="25">
						<?php if($a['created_by_id']==$this->get('user_id')){?>
						<a title="Sửa công văn" class="x-edit" href="#Diploma/Indexs/edit?ID=<?php _e($a['ID']);?>"></a>
						<?php }else{?>
						<a  class="x-noedit"></a>
						<?php }?>
					</td>
					<td align="center" width="25">
						<?php if($a['created_by_id']==$this->get('user_id')){?>
						<a title="Xóa công văn" onclick="module_delete('<?php _baseUrl()?>/Diploma/Indexs/delete?ID=<?php _e($a['ID']);?>')" class="x-delete"></a>
						<?php }else{?>
						<a  class="x-nodelete"></a>
						<?php }?>
					</td>
					<td align="center">
						<input name="ID[]" value="<?php _e($a['ID'])?>" type="checkbox" class="x-checkbox x-checkall"/>
					</td>
				</tr>
			<?php }
			?>
				<tr>
					<td colspan="11" class="page">
						<div class="x-page">
							<?php $this->e("page");?>
						</div>		
					</td>
				</tr>
			<?php
			}
			?>
		</table>
	</form>
